<template>
  <div class="about">
    <h1>我是父组件</h1>
    <!-- @msgChild对应的是子组件中的$emit方法中的第一个参数 -->
    <children :msg="msg" @msgChild="receiveChild"></children>
    <span>{{rChild}}</span>
  </div>
</template>
<script>
import Children from './Children.vue'
export default {
  components:{
    Children
  },
  data(){
    return{
      msg:[1,2,3],
      rChild:''
    }
  },
  methods:{
    receiveChild(value){
      this.rChild = value
    }
  }
}
</script>
